﻿using System;

namespace Core.Domain.Customers
{
    /// <summary>
    /// 用户实体
    /// </summary>
    public partial class Customer : BaseEntity
    {
        /// <summary>
        /// 系统权限
        /// </summary>
        public virtual CustomerRole CustomerRole { get; set; }

        /// <summary>
        /// 注册类型
        /// </summary>
        public int RegisterId { get; set; }

        public RegisterEnum RegisterEnum
        {
            get { return (RegisterEnum)RegisterId; }
            set { this.RegisterId = (int)value; }
        }

        /// <summary>
        /// 唯一识别码
        /// </summary>
        public Guid CustomerGuid { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string Username { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 是否激活
        /// </summary>
        public bool Active { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// 是否系统账户
        /// </summary>
        public bool IsSystemAccount { get; set; }

        /// <summary>
        /// 最后登录Ip
        /// </summary>
        public string LastIpAddress { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedOn { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLoginDate { get; set; }

        /// <summary>
        /// 密码秘钥
        /// </summary>
        public string PasswordSalt { get; set; }
    }
}
